package options

import (
	"github.com/spf13/pflag"
)

// 暂时没用到
type ClientCAOptions struct {
	ClientCA string `json:"client-ca-file" mapstructure:"client-ca-file"`
}

func NewClientCAOptions() *ClientCAOptions {
	return &ClientCAOptions{
		ClientCA: "",
	}
}

func (o *ClientCAOptions) Validate() []error {
	return []error{}
}

func (o *ClientCAOptions) AddFlags(fs *pflag.FlagSet) {
	fs.StringVar(&o.ClientCA, "client-ca-file", o.ClientCA, ""+
		"If set, any request presenting a client certificate signed by one of "+
		"the authorities in the client-ca-file is authenticated with an identity "+
		"corresponding to the CommonName of the client certificate.")
}
